<include file="Public/head"/>
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
table th{
    font-size: 18px;
    color:#000;
}
table td{
    font-size: 15px;
    /*color:#000;*/
}

</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                    <div class="row">
                    <div class="col-xs-12">
                        <div style="width:100%;margin-top:5px;">
                            <button class="layui-btn layui-btn-big layui-btn-normal" onclick="wei()">未评分内部流程</button>
                            <?php if($ji == '1'): ?>
                                <button class="layui-btn layui-btn-big layui-btn-danger" onclick="gong()">公司所有内部流程</button>
                            <?php else: ?>
                                <button class="layui-btn layui-btn-big layui-btn-danger" onclick="yi()">已评分内部流程</button>
                            <?php endif ?>
                            <!-- <button class="layui-btn layui-btn-big " onclick="yi()">医院</button> -->
                        </div>
                        <div class="input-group" style="margin-top:20px;">
                          <input type="text" class="form-control" placeholder="根据姓名搜索..." style="width:200px;" id="suser">
                          <span class="input-group-btn" style="float:left;">
                            <button class="layui-btn layui-btn-primary layui-btn-radius" onclick="sou()" type="button">搜索</button>
                          </span>
                        </div><!-- /input-group -->
                        <div style="margin-top:5px;"></div>
                        <!-- <form id="form" method="post" action="{:U('Shenp/ytong')}" style="margin-top:5%;"> -->
                        <table class="table table-hover" id="wcai">
                            <thead>
                                <tr>
                                    <!-- <th class="center"><input class="check-all" type="checkbox" value=""></th> -->

                                    <!-- <th class="center">id</th> -->
                                    <th class="center">姓名</th>
                                    
                                    <th class="center">
                                        <?php if($ji == '1'): ?>
                                            <div class="layui-input-block" style="width:100px;margin-left:5%;" >
                                              <select name="interest" lay-filter="aihao" style="text-align:center;height:40px;" id="one">
                                                    <option value="0" >所属岗位/部门</option>
                                                <volist name="mentlist" id="k">
                                                    
                                                    <option value="{$k.ment}">{$k.ment}</option>
                                                </volist>
                                                
                                               
                                                
                                              </select>
                                            </div>
                                        <?php else: ?>
                                            所属部门
                                        <?php endif ?>
                                    </th>
                                    <th class="center">
                                        <div class="layui-input-block" style="width:100px;margin-left:17%;" >
                                          <select name="interest" lay-filter="aihao" style="text-align:center;height:40px;" id="tow">
                                                <option value="0">绩效开始时间</option>
                                            <volist name="timelist" id="k">
                                                
                                                <option value="{$k.k_time}">{$k.k_time}</option>
                                            </volist>
                                            
                                           
                                            
                                          </select>
                                        </div>
                                    </th>
                                    <!-- <th class="center">id</th> -->
                                    <th class="center">战略目标</th>
                                    <th class="center">衡量指标</th>
                                    <th class="center">权重</th>
                                    <th class="center">目标值</th>
                                    <th class="center">计分规则</th>
                                    <th class="center">评分人</th>
                                    <th class="center">指标核算结果</th>
                                    <th class="center">标准分</th>
                                    <th class="center">考核得分</th>
                                    <!-- <th class="center">操作</th> -->
                                </tr>
                            </thead>
                            <tbody id="trl">
                               
                                <volist name="list" id="v">
                                        <tr>
                                            <td class="center">{$v.uname}</td>
                                            
                                            <td class="center">{$v.ment}</td>
                                            <td class="center">{$v.k_time}</td>
                                            <td class="center"><b>{$v.target}</b></td>
                                            <td class="center"><b>{$v.norm}</b></td>
                                            <td class="center"><b>{$v.weight}</b></td>
                                            <td class="center"><b>{$v.value}</b></td>
                                            <td class="center" style="width:250px;"><b>{$v.rule}</b></td>
                                            <td style="display:none">{$v.uname}</td>
                                            <td style="display:none">{$v.yue}</td>
                                            <td class="center" style="color:#00a381"><b>{$v.pname}</b></td>
                                            <?php if(!empty($ji)): ?>
                                                
                                                <?php if($v['result'] != '' ): ?>
                                                    <td class="center" style="color:#00a497">{$v.result}</td>
                                                    <td class="center" style="color:#00a497">{$v.standard}</td>
                                                    <td class="center" style="color:#00a497">{$v.score}</td>
                                                    <!-- <td class="center" style="color:#00a497">√已評分</td> -->
                                                    
                                                <?php else: ?>
                                                    <td class="center" style="color:#bf242a">未評分</td>
                                                    <td class="center" style="color:#bf242a">未評分</td>
                                                    <td class="center" style="color:#bf242a">未評分</td>
                                                    <!-- <td class="center" style="color:#bf242a">未評分</td> -->
                                                <?php endif ?>
                                            <?php else: ?>

                                                    <td class="center" style="color:#00a497">{$v.result}</td>
                                                    <td class="center" style="color:#00a497">{$v.standard}</td>
                                                    <td class="center" style="color:#00a497">{$v.score}</td>
                                                    <!-- <td class="center" style="color:#00a497">√已評分</td> -->
                                                    
                                                
                                            <?php endif ?>
                                                
                                        </tr>  
                                    <!-- </form> -->
                                </volist>
                           
                                
                            </tbody>
                        </table>
                        <!-- </form> -->


                    </div>
                    </div>
                    
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<!-- <script src="__PUBLIC__/qwadmin/js/function.js"></script> -->
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
function wei()
{
    location.href="{:U('bu')}";
}
function gong()
{
    location.href="{:U('bulist',array('type'=>1))}";
}
function yi()
{

    location.href="{:U('bulist',array('type'=>2))}";
}
//给下拉框设置事件
$("#one").change(function(){
    
    var ment = this.value;
    var k_time = $('#tow').val();
    var type = '0'; //
    // console.log(ment);
    // console.log(k_time);
     //询问框
    $.ajax({
         type: "POST",
         url:"{:U('xcha')}",
         data:{"ment":ment,"k_time":k_time,'type':type},// 要提交的表单 
         beforeSend:function(){
               layer.load(0, {shade: false});
            },
         success: function(data) {
            if (data != '1111') {
                    for (var i = 0; i < data.length; i++) {
                        $('td').remove();
                        for (var i = 0; i < data.length; i++) {
                                 // console.log(data);
                            $("<tr><td class='center' >"+data[i].uname+"</td><td class='center'>"+data[i].ment+"</td><td class='center'>"+data[i].k_time+"</td><td class='center'>"+data[i].target+"</td><td class='center'>"+data[i].norm+"</td><td class='center'>"+data[i].weight+"</td><td class='center'>"+data[i].value+"</td><td class='center' style='width:250px;'>"+data[i].rule+"</td><td class='center' style='color:#00a381'>"+data[i].pname+"</td><td class='center' style='color:#00a497'>"+data[i].result+"</td><td class='center' style='color:#00a497'>"+data[i].standard+"</td><td class='center' style='color:#00a497'>"+data[i].score+"</td></tr>").appendTo('#wcai');
                            // $('#bfan').show();
                            // $('#bfen').hide();
                        }  
                       
                    }
            }else{
                $('td').remove();
                $("<td class='center' colspan='7' id='lmei'><h1 style='font-size:25px;'>没有搜索到!!!</h1></td>").appendTo('#trl');
            }
         },
         complete: function() {
                 layer.closeAll('loading');
            }
     });
   
})

//给下拉框设置事件
$("#tow").change(function(){
    
    var k_time = this.value;
    var ment = $('#one').val();
    var type = '1';
    // console.log(ment);
    // console.log(k_time);
     //询问框
    $.ajax({
         type: "POST",
         url:"{:U('xcha')}",
         data:{"ment":ment,"k_time":k_time,'type':type},// 要提交的表单 
         beforeSend:function(){
               layer.load(0, {shade: false});
            },
         success: function(data) {
            if (data != '1111') {
                    for (var i = 0; i < data.length; i++) {
                        $('td').remove();
                        for (var i = 0; i < data.length; i++) {
                                 // console.log(data);
                            $("<tr><td class='center' >"+data[i].uname+"</td><td class='center'>"+data[i].ment+"</td><td class='center'>"+data[i].k_time+"</td><td class='center'>"+data[i].target+"</td><td class='center'>"+data[i].norm+"</td><td class='center'>"+data[i].weight+"</td><td class='center'>"+data[i].value+"</td><td class='center' style='width:250px;'>"+data[i].rule+"</td><td class='center' style='color:#00a381'>"+data[i].pname+"</td><td class='center' style='color:#00a497'>"+data[i].result+"</td><td class='center' style='color:#00a497'>"+data[i].standard+"</td><td class='center' style='color:#00a497'>"+data[i].score+"</td></tr>").appendTo('#wcai');
                            // $('#bfan').show();
                            // $('#bfen').hide();
                        }  
                       
                    }
            }else{
                $('td').remove();
                $("<td class='center' colspan='7' id='lmei'><h1 style='font-size:25px;'>没有搜索到!!!</h1></td>").appendTo('#trl');
            }
         },
         complete: function() {
                 layer.closeAll('loading');
            }
     });
   
})


//用户姓名搜索
function sou()
{
    var user = $('#suser').val();
    var type = '0';
    // console.log(user);
    $.ajax({
         type: "POST",
         url:"{:U('sou')}",
         data:{"user":user,'type':type},// 要提交的表单 
         beforeSend:function(){
               layer.load(0, {shade: false});
            },
         success: function(data) {
            if (data != '1111') {
                    for (var i = 0; i < data.length; i++) {
                        $('td').remove();
                        for (var i = 0; i < data.length; i++) {
                                 // console.log(data);
                            $("<tr><td class='center' >"+data[i].uname+"</td><td class='center'>"+data[i].ment+"</td><td class='center'>"+data[i].k_time+"</td><td class='center'>"+data[i].target+"</td><td class='center'>"+data[i].norm+"</td><td class='center'>"+data[i].weight+"</td><td class='center'>"+data[i].value+"</td><td class='center' style='width:250px;'>"+data[i].rule+"</td><td class='center' style='color:#00a381'>"+data[i].pname+"</td><td class='center' style='color:#00a497'>"+data[i].result+"</td><td class='center' style='color:#00a497'>"+data[i].standard+"</td><td class='center' style='color:#00a497'>"+data[i].score+"</td></tr>").appendTo('#wcai');
                            // $('#bfan').show();
                            // $('#bfen').hide();
                        }  
                       
                    }
            }else{
                layer.msg('您不能查询其他部门人员', {icon: 2});
                // history.go(0);
                
            }
         },
         complete: function() {
                 layer.closeAll('loading');
            }
     });
}

</script>
</body>
</html>



  